const { merge } = require("webpack-merge");
const path = require("path");
const base = require("./webpack.base");
const fs = require("fs-extra");
const { getBundleType } = require("./utils");

const suffix = getBundleType();

module.exports = merge(base, {
  mode: "development",
  devtool: "cheap-module-source-map",
  entry: `./demo/index${suffix}`,
  devServer: {
    hot: true,
    historyApiFallback: {
      index: "./index.html",
    },
  },
});
